class PreviewHomework {
  int count;
  Item item;
  int finishCount;

  PreviewHomework({this.count, this.item, this.finishCount});

  PreviewHomework.fromJson(Map<String, dynamic> json) {
    count = json['count'];
    item = json['item'] != null ? new Item.fromJson(json['item']) : null;
    finishCount = json['finishCount'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['count'] = this.count;
    if (this.item != null) {
      data['item'] = this.item.toJson();
    }
    data['finishCount'] = this.finishCount;
    return data;
  }
}

class Item {
  String id;
  String name;
  String ksid;
  int systype;
  int sort;
  String addtime;
  String username;
  String truename;
  int jobtype;
  String sourceid;
  int genflag;
  int delflag;
  String rgrade;
  String rvolume;
  String rsubject;
  String rversion;
  String sectton;
  int activeJobCount;

  Item(
      {this.id,
        this.name,
        this.ksid,
        this.systype,
        this.sort,
        this.addtime,
        this.username,
        this.truename,
        this.jobtype,
        this.sourceid,
        this.genflag,
        this.delflag,
        this.rgrade,
        this.rvolume,
        this.rsubject,
        this.rversion,
        this.sectton,
        this.activeJobCount});

  Item.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    ksid = json['ksid'];
    systype = json['systype'];
    sort = json['sort'];
    addtime = json['addtime'];
    username = json['username'];
    truename = json['truename'];
    jobtype = json['jobtype'];
    sourceid = json['sourceid'];
    genflag = json['genflag'];
    delflag = json['delflag'];
    rgrade = json['rgrade'];
    rvolume = json['rvolume'];
    rsubject = json['rsubject'];
    rversion = json['rversion'];
    sectton = json['sectton'];
    activeJobCount = json['activeJobCount'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    data['ksid'] = this.ksid;
    data['systype'] = this.systype;
    data['sort'] = this.sort;
    data['addtime'] = this.addtime;
    data['username'] = this.username;
    data['truename'] = this.truename;
    data['jobtype'] = this.jobtype;
    data['sourceid'] = this.sourceid;
    data['genflag'] = this.genflag;
    data['delflag'] = this.delflag;
    data['rgrade'] = this.rgrade;
    data['rvolume'] = this.rvolume;
    data['rsubject'] = this.rsubject;
    data['rversion'] = this.rversion;
    data['sectton'] = this.sectton;
    data['activeJobCount'] = this.activeJobCount;
    return data;
  }
}